AUTOMATIC FLOWCHART GENERATION
==============================

The Flow program creates a text flowchart from commands placed in the
comment field of a RISC-V source program. Add a flowchart marker immediately
after // to tell Flow which parts of the source line to include.

Flow can also identify labels, jumps, and conditional branches and add their
connections automatically.


FLOWCHART MARKERS
-----------------

Marker   Output
------   --------------------------------------------------------------
//<|>    Print the statement, then the comment, then a divider line (|).
//|>     Print the comment, followed by a divider line (|).
//<|     Print the statement, followed by a divider line (|).
//<      Print the statement only.
//>      Print the comment only.
//>>     Print the introductory comment block at the start of the program.

The //>> marker is reserved for the opening description. Flow continues
printing that comment block until it reaches an empty line.


WRITING USEFUL FLOWCHART COMMENTS
---------------------------------

Choose short comments that describe the purpose of each operation. A useful
comment explains the decision or action without merely repeating the source
instruction.

For example:

    Less useful:   Branch if x4 is greater than or equal to x2
    Better:        Is x4 the larger value?

Automatic flowcharts work best when a program has clear labels, short
decision paths, and carefully worded comments. Some programs may be too
complex or may not benefit from an automatic text flowchart.


ALIGNED EXAMPLE
---------------

The following chart finds the largest of three integers. Register x4 contains
the current largest value. The first decision compares x4 with x2; the second
decision compares the current result with x3.


                 FIND THE LARGEST OF THREE INTEGERS
                                  |
                        [start]-->|
                                  |
                   [check3]<--Y--< >  Is x4 >= x2?
                                  |N
                                  |
                               x4 = x2  
                                  |
                             x2 is larger  
                                  |
                       [check3]-->|
                                  |
                     [done]<--Y--< >  Is x4 >= x3?
                                  |N
                                  |
                               x4 = x3  
                                  |
                             x3 is larger 
                                  |
                         [done]-->|
                                  |
                                  v
                                END


HOW TO READ THE EXAMPLE
-----------------------

1. The vertical line shows the normal path through the program.
2. A Y branch jumps left to the label shown in brackets.
3. An N result continues downward to the next operation.
4. [check3] begins the comparison with x3.
5. [done] marks the end of the selection process.

Use the print button to create a hard copy. 
